Xbasic

*add_months Function

Syntax

dim newTime as T = *ADD_MONTHS(time as T, months as N)

Arguments

timeTime

A time value.

monthsNumeric

The number of months to add to the time value. Months can be a negative value.

Returns

newTimeTime

Returns the time value incremented by months.

Description

Add months to date or time.

Example

dim time as t
time = now()
? time
= 10/12/2017 08:54:05 89 am

dim increment as n
increment = round(rand()*100,0)
? increment
= 2

? *add_months(time, increment)
= 12/12/2017 08:54:05 89 am

See Also